package com.company.easy;

import java.util.*;

public class LK599 {
    public static void main(String[] args) {
        String str = "";
        char[] chars = str.toCharArray();
        HashMap<Character,Integer> map = new HashMap<>();
        for(int i =0;i<chars.length;i++){

        }


    }
    public static int test(int x){
        int ret = 0;
        while(x!=0){
            int temp = ret*10+x%10;
            ret = temp;
            x/=10;
        }
        return ret;
    }
    public String[] findRestaurant(String[] list1, String[] list2) {
        HashMap<String,Integer> map = new HashMap<>();
        for(int i=0;i<list1.length;i++){
            map.put(list1[i],0);
        }
        List<String> list = new ArrayList<>();
        for(int i=0;i<list2.length;i++){
            if(map.containsKey(list2[i])){
                list.add(list2[i]);
            }
        }
        String[] strings = new String[list.size()];
        for (int i = 0; i <list.size() ; i++) {
            strings[i] = list.get(i);
        }
        return strings;
    }
}
